package com.atguigu.mq.controller;

import com.atguigu.mq.constant.PunchConst;
import com.atguigu.mq.result.Result;
import com.atguigu.mq.service.PunchClockService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author KEIO  on 2021/9/1.
 * @version 1.0
 */
@Api(tags = "疫情打卡")
@RestController
@RequestMapping("/punch")
public class PunchClockController {


    @Autowired
    PunchClockService punchClockService;

    @ApiOperation(value = "立即打卡")
    @PostMapping("/rightnow")
    public Result  punchRightNow(){

//        System.setProperty("http.proxyHost", "localhost");
//        System.setProperty("http.proxyPort", "8888");
//        System.setProperty("https.proxyHost", "localhost");
//        System.setProperty("https.proxyPort", "8888");

        punchClockService.punchClockRightNow();

        return Result.ok();
    }



}
